<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%--
  ~ /*
  ~  * Copyright (c) 2015. For Intelligent Group.
  ~  */
  --%>

<c:set var="ctx" value="${pageContext.request.contextPath}"/>


<div class="row">
    <div class="col-sm-12">
        <div class="well">
            <div class="widget-body-toolbar">

                <strong><spring:message code="DI_HISTORY_TITLE"/></strong>
                <i><spring:message code="DI_HISTORY_SUBTITLE"/></i>
                <%--<a href="#analysis/spc" class="pull-right"><i class="fa fa-reply"> <spring:message code="GLOBAL_RETURN_BACK"/></i></a>--%>
            </div>

            <div class="widget-body no-padding" style="margin-top: 10px;">
                <!-- row -->
                <div class="row">
                    <div class="col-sm-12 col-md-12 col-lg-12">
                        <!-- simple search -->
                        <div id="simple-search">
                            <!--<div class="col-sm-12 col-md-12 col-lg-12">-->
                            <div class="input-group">
                                <input class="form-control" type="text" placeholder="<spring:message code='DI_HISTORY_FILE_ONAME'/> or <spring:message code='DI_HISTORY_FILE_SNAME'/>" id="search-input" name="search_LIKE_standardName">
                                <div class="input-group-btn">
                                    <button id="btn-simple-search" type="button" class="btn btn-default btn-primary">
                                        <i class="fa fa-search "></i> <spring:message code='GLOBAL_BUTTON_SEARCH'/>
                                    </button>
                                </div>
                            </div>
                            <!--</div>-->
                        </div>
                        <!-- end simple search -->
                    </div>
                </div>
                <!-- end row -->
            </div>
            <!-- end widget body -->
        </div>
    </div>
</div>

<div class="row">
    <article class="col-sm-12 col-md-12 col-lg-12 sortable-grid ui-sortable">
        <div class="jarviswidget well" id="wid-id-1">
            <div class="widget-body">
                <ul id="history" class="nav nav-tabs bordered">
                    <li class="active">
                        <a data-toggle="tab" href="#testFile">
                            <span class="hidden-mobile hidden-tablet"> <spring:message
                                    code="DI_HISTORY_FILE"/></span>
                        </a>
                    </li>
                    <li>
                        <a data-toggle="tab" href="#deleteTestFile">
                            <span class="hidden-mobile hidden-tablet"><spring:message
                                    code="DI_HISTORY_DELETE_FILE"/> </span>
                        </a>
                    </li>
                </ul>
                <div class="tab-content padding-10">
                    <%--<div class="tab-content padding-10">--%>
                    <div class="tab-pane fade in active " id="testFile">
                        <!-- row -->
                        <table id="dt_testFiles" class="table table-bordered table-hover" width="100%">
                            <thead>
                            <tr>
                                <th width="20" data-hide="phone"><spring:message code="TABLE_NO"/></th>
                                <th data-class="expand"><spring:message code="DI_HISTORY_FILE_ID"/></th>
                                <th data-class="expand"><spring:message code="DI_HISTORY_FILE_PROJECT"/></th>
                                <th data-class="expand"><spring:message code="DI_HISTORY_FILE_ONAME"/></th>
                                <th data-hide="phone"><spring:message code="DI_HISTORY_FILE_SNAME"/></th>
                                <th data-class="expand"><spring:message code="DI_HISTORY_FILE_PATH"/></th>
                                <th data-class="expand"><spring:message code="DI_HISTORY_FILE_ACTOR"/></th>
                                <th data-class="expand"><spring:message code="DI_HISTORY_FILE_IMPORTTIME"/></th>
                                <th data-class="expand"><spring:message code="DI_HISTORY_FILE_STATUS"/></th>
                                <th width="10%"><spring:message code="GLOBAL_OPERATE"/></th>
                            <%--<th data-class="expand">Description</th>--%>
                                <%--<th class="col-sm-1"><spring:message code='PROJECT_OPERATOR'/></th>--%>
                            </tr>
                            </thead>
                            <tbody></tbody>
                        </table>
                    </div>
                    <div class="tab-pane fade" id="deleteTestFile">
                        <!-- row -->
                        <table id="dt_deleteTestFiles" class="table table-bordered table-hover" width="100%">
                            <thead>
                            <tr>
                                <th width="20" data-hide="phone"><spring:message code="TABLE_NO"/></th>
                                <th data-class="expand"><spring:message code="DI_HISTORY_FILE_ID"/></th>
                                <th data-class="expand"><spring:message code="DI_HISTORY_FILE_PROJECT"/></th>
                                <th data-class="expand"><spring:message code="DI_HISTORY_FILE_ONAME"/></th>
                                <th data-hide="phone"><spring:message code="DI_HISTORY_FILE_SNAME"/></th>
                                <th data-class="expand"><spring:message code="DI_HISTORY_FILE_PATH"/></th>
                                <th data-class="expand"><spring:message code="DI_HISTORY_FILE_ACTOR"/></th>
                                <th data-class="expand"><spring:message code="DI_HISTORY_FILE_IMPORTTIME"/></th>
                                <th data-class="expand"><spring:message code="DI_HISTORY_FILE_STATUS"/></th>
                                <th width="10%"><spring:message code="GLOBAL_OPERATE"/></th>
                                <%--<th data-class="expand">Description</th>--%>
                                <%--<th class="col-sm-1"><spring:message code='PROJECT_OPERATOR'/></th>--%>
                            </tr>
                            </thead>
                            <tbody></tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </article>
</div>
<script src="js/core/business/dataimport/dataImportHistoryInit.js"></script>

<%--<script src="js/plugin/pace/pace.min.js"></script>
<script type="text/javascript">
    appendBreadCrumb("data/import", $.i18n.prop('DI_HISTORY_TITLE'));

    // DO NOT REMOVE : GLOBAL FUNCTIONS!
    pageSetUp();

    // load related plugins
    loadScript("js/plugin/datatables/jquery.dataTables.min.js", function(){
        loadScript("js/plugin/datatables/dataTables.colVis.min.js", function(){
            loadScript("js/plugin/datatables/dataTables.tableTools.min.js", function(){
                loadScript("js/plugin/datatables/dataTables.bootstrap.min.js", function(){
                    loadScript("js/plugin/datatable-responsive/dataTables.responsive.min.js", runDataTables)
                });
            });
        });
    });

    function runDataTables() {
        loadScript("js/core/system/dataImportHistory.js", init);
    }
    /*Init dataTable and the Event*/
    function init() {
        var isINIT = true;
        $('#history a[href="#testFile"]').click(function (e) {
            e.preventDefault();
            $('#dt_testFiles').DataTable().draw();

            return;
        });
        $('#history a[href="#deleteTestFile"]').click(function (e) {
            e.preventDefault();
            if (isINIT) {
                dataImportHistory_delete.runDataTables();
                dataImportHistory_delete.initBasicSearchEvent();
                isINIT = false;
                return;
            }
            $('#dt_deleteTestFiles').DataTable().draw();
            return;
        });

        dataImportHistory.runDataTables();
        dataImportHistory.initBasicSearchEvent();

    }

</script>--%>
